package com.woniu.user.controller;


import com.woniu.entity.Result;
import com.woniu.user.service.IUserCircleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 我的车圈表 前端控制器
 * </p>
 *
 * @author LiFangyu
 * @since 2023-02-15
 */
@RestController
@RequestMapping("/user-circle")
public class UserCircleController {

    @Autowired
    private IUserCircleService userCircleService;
    @ApiOperation("关注车圈")
    @GetMapping("/addLikeCircle/{userPhone}/{circleId}")
    public Result addLikeCircle(@PathVariable("userPhone") String userPhone, @PathVariable("circleId") String circleId){
        return userCircleService.addLikeCircle(userPhone,circleId);
    }

    @ApiOperation("取消关注车圈")
    @GetMapping("/rmLikeCircle/{userPhone}/{circleId}")
    public Result rmLikeCircle(@PathVariable("userPhone") String userPhone, @PathVariable("circleId") String circleId){
        return userCircleService.rmLikeCircle(userPhone,circleId);
    }

}
